<!DOCTYPE html>
<%@page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" uri="/WEB-INF/framework/tlds/EF-2.0.tld" %>
<% String actionUrl = request.getContextPath() + "/DispatchAction.do"; %>
<html>
<EF:EFHead includeDefault="true">
<script type="text/javascript" src="./ZM/zm.js"></script>
</EF:EFHead>
<EF:EFBody>
	<EF:EFForm formId="ZMCG80" method="POST" action="<%=actionUrl%>"> 
		<br>
		<div style="margin:0 auto;text-align:center"><label style="font-size:30px;">矿生产调度日报</label></div>
	<div id="ef_region_inqu" title="查询条件" efRegionShowClear="false">
  <EF:EFInput type="hidden" ename="fdReport" cname="日期"/>
		<div class="row-fluid">
			<div class="span6">
				<EF:EFInput blockId="inqu_status" row="0" type="text" ename="fdReport" cname="日期"  isRequired="true" popup="date" />
			</div>
	    </div>
	</div>
		
		 <div id="ef_region_result" title="本日生产情况" style="overflow: scroll">
 			<div id="ef_grid_result" title="页面信息" style="overflow: hidden; height: 195px;"> 
			<table>
			    <tr>  
					<td nowrap width="5%"  style="text-align:center;font-weight:bold">早班情况： </td>
					<td nowrap width="8%" align="right">产量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMinesumDay"/></td>
					<td nowrap width="8%" align="right">进尺:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMovelengthDay"/></td>
					<td nowrap width="8%" align="right">排矸量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdPgvalueDay"/></td>
					<td nowrap width="8%" align="right">矸子:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdGanzivalueDay"/></td>
					<td nowrap width="8%" align="right">材料:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdClvalueDay"/></td>
				</tr>
				<tr>  
					<td nowrap width="5%" style="text-align:center;font-weight:bold">中班情况： </td>
					<td nowrap width="8%" align="right">产量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMinesumMiddle"/></td>
					<td nowrap width="8%" align="right">进尺:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMovelengthMiddle"/></td>
					<td nowrap width="8%" align="right">排矸量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdPgvalueMiddle"/></td>
					<td nowrap width="8%" align="right">矸子:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdGanzivalueMiddle"/></td>
					<td nowrap width="8%" align="right">材料:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdClvalueMiddle"/></td>
				</tr>
				<tr>
					<td nowrap width="5%" style="text-align:center;font-weight:bold">夜班情况：  </td>
					<td nowrap width="8%" align="right">产量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMinesumNight"/></td>
					<td nowrap width="8%" align="right">进尺:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMovelengthNight"/></td>
					<td nowrap width="8%" align="right">排矸量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdPgvalueNight"/></td>
					<td nowrap width="8%" align="right">矸子:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdGanzivalueNight"/></td>
					<td nowrap width="8%" align="right">材料:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdClvalueNight"/></td>
				</tr>
				<tr>  
					<td nowrap width="5%"  style="text-align:center;font-weight:bold">日累计： </td>
					<td nowrap width="8%" align="right">产量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMinesumDsum"/></td>
					<td nowrap width="8%" align="right">进尺:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMovelengthDsum"/></td>
					<td nowrap width="8%" align="right">排矸量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdPgvalueDsum"/></td>
					<td nowrap width="8%" align="right">矸子:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdGanzivalueDsum"/></td>
					<td nowrap width="8%" align="right">材料:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdClvalueDsum"/></td>
				</tr>
				<tr>  
					<td nowrap width="5%"  style="text-align:center;font-weight:bold">月累计： </td>
					<td nowrap width="8%" align="right">产量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="result" row="0" etc="readonly=readonly" ename="fdMinesumMsum"/></td>
					<td nowrap width="8%" align="right">进尺:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMovelengthMsum"/></td> 
				</tr>
				<tr>  
					<td nowrap width="5%"  style="text-align:center;font-weight:bold">年累计： </td>
					<td nowrap width="8%" align="right">产量:</td>
					<td nowrap width="12%"><EF:EFInput blockId="result" row="0" etc="readonly=readonly" ename="fdMinesumYsum"/></td>
					<td nowrap width="8%" align="right">进尺:</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdMovelengthYsum"/></td> 
				</tr>
				<tr>  
					<td nowrap width="5%"  style="text-align:center;font-weight:bold">煤质情况： </td>
					<td nowrap width="8%" align="right">商品煤灰分(%):</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdBeginDate"/></td>
					<td nowrap width="8%" align="right">毛煤灰分(%):</td>
					<td nowrap width="12%"><EF:EFInput blockId="ef_grid_result" etc="readonly=readonly" ename="fdEndDate"/></td> 
				</tr>
			</table>
			</div>
	</div> 
	
	
		<div id="ef_tab_y" lastRange="98%" eftabWidth="100%" style="overflow: hidden;border-width:0px;padding:0px">
			<div id="tab1" title="班组工作汇报" eftabSrc="DispatchAction.do?efFormEname=ZMCH80&flag=1" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab2" title="领导值班 " eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab3" title="采煤进度 " eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab4" title="掘进进度 " eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab5" title="抽采进度日汇报 " eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab6" title="竖井提升和排矸" eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab7" title="生产事故" eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
			<div id="tab8" title="重点调度" eftabSrc="about:blank" efRemember="yes" style="border:0px;padding:0px"></div>
		</div> 
		<EF:EFRegion /> 
 		<EF:EFTab tabId="y" action="fundiv"/> 
		<script type="text/javascript"> 
			var frames = $("#ef_tab_y iframe");
			if(window.parent != window && window.parent.hideSubPageHead == true) {
				$("#ef_tab_y").css("padding-top", "8px").css("padding-left", "4px");
			}
			onSubPageLoad = function(wnd) {
				for(var i=0; i<frames.length; i++) {
					if (frames[i].contentWindow == wnd) {
						adjustFrameHeight(frames[i]);
					/* 	alert(frames[i].src); */
						var grid = frames[i].contentWindow.efgrid.getGridObject("ef_grid_result");
						insertData(grid);
						break;
					}
				}
				
			}
			
		    insertData = function(grid) {
				var rows = grid.getRowCount();
				fdReport = $("#inqu_status-0-fdReport").val()
				$("#ef_grid_result-fdMinesumDay").val("0");
				$("#ef_grid_result-fdMinesumMiddle").val("0");
				$("#ef_grid_result-fdMinesumNight").val("0");
				$("#ef_grid_result-fdMinesumDsum").val("0");
				$("#ef_grid_result-fdMovelengthDay").val("0");
				$("#ef_grid_result-fdMovelengthMiddle").val("0");
				$("#ef_grid_result-fdMovelengthNight").val("0");
				$("#ef_grid_result-fdMovelengthDsum").val("0");
				$("#ef_grid_result-fdPgvalueDay").val("0");
				$("#ef_grid_result-fdPgvalueMiddle").val("0");
				$("#ef_grid_result-fdPgvalueNight").val("0");
				$("#ef_grid_result-fdPgvalueDsum").val("0");
				$("#ef_grid_result-fdGanzivalueDay").val("0");
				$("#ef_grid_result-fdGanzivalueMiddle").val("0");
				$("#ef_grid_result-fdGanzivalueNight").val("0");
				$("#ef_grid_result-fdGanzivalueDsum").val("0");
				$("#ef_grid_result-fdClvalueDay").val("0");
				$("#ef_grid_result-fdClvalueMiddle").val("0");
				$("#ef_grid_result-fdClvalueNight").val("0");
				$("#ef_grid_result-fdClvalueDsum").val("0");
				
				for (var r=0; r < rows; r ++) {
					fdMineSum = grid.getCellValueByColumnName(r,"fdMineSum");
					fdStatus = grid.getCellValueByColumnName(r,"fdStatus");
					fdWorknumId = grid.getCellValueByColumnName(r,"fdWorknumId");  
					fdMoveLength = grid.getCellValueByColumnName(r,"fdMoveLength");
					fdPgValue = grid.getCellValueByColumnName(r,"fdPgValue");
					fdGanziValue = grid.getCellValueByColumnName(r,"fdGanziValue");
					fdClValue = grid.getCellValueByColumnName(r,"fdClValue");
					//产量
					if(fdStatus == "已发布" && fdWorknumId == "5ea8c0ffc0a8044e004c92e1909ef091" && fdReport != "")//早班
					{
						$("#ef_grid_result-fdMinesumDay").val(fdMineSum);
						$("#ef_grid_result-fdMinesumDsum").val(parseFloat($("#ef_grid_result-fdMinesumDay").val())+parseFloat($("#ef_grid_result-fdMinesumMiddle").val())+parseFloat($("#ef_grid_result-fdMinesumNight").val()));
					}else if(fdStatus == "已发布" && fdWorknumId == "13d060d9c0a8047c7efc7efceabe5fba" && fdReport != "")//中班
					{
						$("#ef_grid_result-fdMinesumMiddle").val(fdMineSum);
						$("#ef_grid_result-fdMinesumDsum").val(parseFloat($("#ef_grid_result-fdMinesumDay").val())+parseFloat($("#ef_grid_result-fdMinesumMiddle").val())+parseFloat($("#ef_grid_result-fdMinesumNight").val()));
					}else if(fdStatus == "已发布" && fdWorknumId == "13d0e2fac0a8047c7efc7efcacc0ba4c" && fdReport != "")//晚班
					{
						$("#ef_grid_result-fdMinesumNight").val(fdMineSum);
						$("#ef_grid_result-fdMinesumDsum").val(parseFloat($("#ef_grid_result-fdMinesumDay").val())+parseFloat($("#ef_grid_result-fdMinesumMiddle").val())+parseFloat($("#ef_grid_result-fdMinesumNight").val()));
					}
                    //进尺
                    if(fdStatus == "已发布" && fdWorknumId == "5ea8c0ffc0a8044e004c92e1909ef091" && fdReport != "")//早班
					{
						$("#ef_grid_result-fdMovelengthDay").val(fdMoveLength);
						$("#ef_grid_result-fdMovelengthDsum").val(parseFloat($("#ef_grid_result-fdMovelengthDay").val())+parseFloat($("#ef_grid_result-fdMovelengthMiddle").val())+parseFloat($("#ef_grid_result-fdMovelengthNight").val()));
					}else if(fdStatus == "已发布" && fdWorknumId == "13d060d9c0a8047c7efc7efceabe5fba" && fdReport != "")//中班
					{
						$("#ef_grid_result-fdMovelengthMiddle").val(fdMoveLength);
						$("#ef_grid_result-fdMovelengthDsum").val(parseFloat($("#ef_grid_result-fdMovelengthDay").val())+parseFloat($("#ef_grid_result-fdMovelengthMiddle").val())+parseFloat($("#ef_grid_result-fdMovelengthNight").val()));
					}else if(fdStatus == "已发布" && fdWorknumId == "13d0e2fac0a8047c7efc7efcacc0ba4c" && fdReport != "")//晚班
					{
						$("#ef_grid_result-fdMovelengthNight").val(fdMoveLength);
						$("#ef_grid_result-fdMovelengthDsum").val(parseFloat($("#ef_grid_result-fdMovelengthDay").val())+parseFloat($("#ef_grid_result-fdMovelengthMiddle").val())+parseFloat($("#ef_grid_result-fdMovelengthNight").val()));
					}
                    //排矸量
                    if(fdStatus == "已发布" && fdWorknumId == "5ea8c0ffc0a8044e004c92e1909ef091" && fdReport != "")//早班
					{
						$("#ef_grid_result-fdPgvalueDay").val(fdPgValue);
					}else if(fdStatus == "已发布" && fdWorknumId == "13d060d9c0a8047c7efc7efceabe5fba" && fdReport != "")//中班
					{
						$("#ef_grid_result-fdPgvalueMiddle").val(fdPgValue);
					}else if(fdStatus == "已发布" && fdWorknumId == "13d0e2fac0a8047c7efc7efcacc0ba4c" && fdReport != "")//晚班
					{
						$("#ef_grid_result-fdPgvalueNight").val(fdPgValue);
					}
                    //矸子
                     if(fdStatus == "已发布" && fdWorknumId == "5ea8c0ffc0a8044e004c92e1909ef091" && fdReport != "")//早班
					{
						$("#ef_grid_result-fdGanzivalueDay").val(fdGanziValue);
					}else if(fdStatus == "已发布" && fdWorknumId == "13d060d9c0a8047c7efc7efceabe5fba" && fdReport != "")//中班
					{
						$("#ef_grid_result-fdGanzivalueMiddle").val(fdGanziValue);
					}else if(fdStatus == "已发布" && fdWorknumId == "13d0e2fac0a8047c7efc7efcacc0ba4c" && fdReport != "")//晚班
					{
						$("#ef_grid_result-fdGanzivalueNight").val(fdGanziValue);
					}
                    //材料
                      if(fdStatus == "已发布" && fdWorknumId == "5ea8c0ffc0a8044e004c92e1909ef091" && fdReport != "")//早班
					{
						$("#ef_grid_result-fdClvalueDay").val(fdClValue);
					}else if(fdStatus == "已发布" && fdWorknumId == "13d060d9c0a8047c7efc7efceabe5fba" && fdReport != "")//中班
					{
						$("#ef_grid_result-fdClvalueMiddle").val(fdClValue);
					}else if(fdStatus == "已发布" && fdWorknumId == "13d0e2fac0a8047c7efc7efcacc0ba4c" && fdReport != "")//晚班
					{
						$("#ef_grid_result-fdClvalueNight").val(fdClValue);
					}
				}
		    }
			
			adjustFrameHeight = function(frame) {
				var oldHeight = $(frame).height();
				$(frame).css("border", "0");
				$("#jquery_tab_div_content").css("border", "0");
				var height = frame.contentWindow.document.body.scrollHeight;
				if (height > oldHeight) {
					$(frame).css("height", height);
				}
				if(window.parent != window && window.parent.hideSubPageHead == true) {
					var pFrames = window.parent.frames;
					for(var i=0; i<pFrames.length; i++) {
						if (pFrames[i].contentWindow == window) {
							window.parent.adjustFrameHeight(pFrames[i]);
							break;
						}
					}
				}
			}
			</script>
	</EF:EFForm> 
</EF:EFBody> 
</html>